﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace VulnDBExplorer.Services.Impl {
	public class HgRepository: Repository {
	}

	public class HgCodebase : Codebase {

		public override string getRelativePath(string filename) {
			string result = filename;
			if (filename.StartsWith(Folder, StringComparison.OrdinalIgnoreCase))
				result = filename.Substring(Folder.Length);
			if (result.StartsWith("\\"))
				result = result.Substring(1);
			return result;
		}

		public override string getFullPath(string filename) {
			return Path.Combine(Folder, filename);
		}
	}
}
